package com.firefly.service.query.mc;

import com.firefly.dao.dao.mc.po.UserPo;
import com.firefly.dao.dao.mc.service.AgentService;
import com.firefly.dao.dao.mc.service.McRolePermissionService;
import com.firefly.dao.dao.mc.service.UserService;
import com.firefly.dao.assembler.mc.McUserAssembler;
import com.firefly.dao.vo.mc.McUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: 用户信息
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2023/2/10
 **/
@Service
public class McUserQuery {
    private final UserService userService;
    private final McUserAssembler mcUserAssembler;
    private final AgentService agentService;
    private final McRolePermissionService mcRolePermissionService;
    @Autowired
    public McUserQuery(UserService userService,McUserAssembler mcUserAssembler,AgentService agentService,McRolePermissionService mcRolePermissionService){
        this.userService = userService;
        this.mcUserAssembler = mcUserAssembler;
        this.agentService = agentService;
        this.mcRolePermissionService = mcRolePermissionService;
    }
    // 单个用户信息查询
    public McUserVo getDetail(Integer id){
        UserPo entity = userService.getById(id);
        return mcUserAssembler.getVo(entity);
    }
}
